﻿<%@ Page Language="C#" MasterPageFile="~/common.master" AutoEventWireup="true" CodeFile="NewsShow.aspx.cs" Inherits="page_NewsShow" Title="Untitled Page" %>
<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
    <asp:GridView ID="GridView1" runat="server" AllowPaging="True" AutoGenerateColumns="False"
        CellPadding="4" DataSourceID="TarreOADB" ForeColor="#333333" GridLines="None"
        Height="160px" PageSize="2" Width="623px">
        <PagerSettings Mode="NextPreviousFirstLast" />
        <FooterStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" />
        <Columns>
            <asp:HyperLinkField DataNavigateUrlFields="id" DataNavigateUrlFormatString="ShowDetail.aspx?id={0}"
                DataTextField="Title" HeaderText="标题" NavigateUrl="~/page/ShowDetail.aspx" />
            <asp:BoundField DataField="username" HeaderText="发布人" SortExpression="Title" />
            <asp:BoundField DataField="sectionname" HeaderText="部门" />
            <asp:BoundField DataField="IssueTime" HeaderText="时间" SortExpression="IssueTime" />
        </Columns>
        <RowStyle BackColor="#EFF3FB" />
        <EditRowStyle BackColor="#2461BF" />
        <SelectedRowStyle BackColor="#D1DDF1" Font-Bold="True" ForeColor="#333333" />
        <PagerStyle BackColor="#2461BF" ForeColor="White" HorizontalAlign="Center" />
        <HeaderStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" />
        <AlternatingRowStyle BackColor="White" />
    </asp:GridView>
    <asp:SqlDataSource ID="TarreOADB" runat="server" ConnectionString="Data Source=192.168.1.23;Initial Catalog=TarreOADB;User ID=sa;Password=lislis"
        SelectCommand="SELECT News.Id, News.Title, News.State, Usertb.UserName, Sectiontb.SectionName, News.IssueTime FROM Usertb LEFT OUTER JOIN News ON News.IssueUser = Usertb.UserId INNER JOIN Sectiontb ON News.SectionId = Sectiontb.SectionId">
    </asp:SqlDataSource>
</asp:Content>

